# Authors:  Joseph Durel, Anurodh Giri, Mauricio Torrejon, Jeremy Vatter
# Assignment 1
# Date Last Modified: 11 October 2011
# 
# Purpose: Makes robot move in a 1 meter square

import create
import time


robot = create.Create("/dev/tty.KeySerial1")
robot.toFullMode()

# Simple for-loop which asks the robot to move 1 meter, and then turn 90º
# counter-clockwise and repeat it until it has moved in a square
for counter in range (1, 5):
    robot.move( 100, 20 )
    if counter < 4: 
        robot.turn(90)
    counter += 1